package io.closes.controller;

import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

@RestController
@RequestMapping("/http")
public class HttpTest {

//    @RequestMapping(value = "getParameter" ,method = RequestMethod.POST)
//    public String test1(HttpServletRequest httpServletRequest) throws IOException {
//        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
//
//        ServletInputStream inputStream = request.getInputStream();
//        ServletInputStream inputStream1 = httpServletRequest.getInputStream();
//        inputStream1.
//    }
}
